import http from "@/api";

import { ResPage } from "@/api/interface";

import { IntegralAddEntity, IntegralAddVo } from "@/biz/interface/IntegralType";

import { ModuleMainUrl } from "..";

const moduleUrl = ModuleMainUrl;

// * 获取系统积分人工添加列表
export const getIntegralAddVoListApi = (params: {}) => {
  return http.post<ResPage<IntegralAddVo>>(moduleUrl + `/sysitg/adtvolist`, params);
};

// * 新增系统积分人工添加接口
export const saveIntegralAddApi = (integralAdd: IntegralAddEntity) => {
  return http.post(moduleUrl + `/sysitg/adtsave`, integralAdd);
};

// * 详情系统积分人工添加接口
export const getIntegralAddInfoApi = (params: { id: string }) => {
  return http.post<IntegralAddEntity>(moduleUrl + `/sysitg/adtinfo`, params);
};

// * 删除系统积分人工添加接口
export const deleteIntegralAddApi = (params: { id: string }) => {
  return http.post(moduleUrl + `/sysitg/adtdelete`, params);
};

// * 修改系统积分人工添加状态接口
export const changeFlagActiveApi = (params: { id: string }) => {
  return http.post(moduleUrl + `/sysitg/adtactive`, params);
};
